import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import Login from './pages/login/login'
import Index from './App'
import Notfound from './components/notfound/notfound'
import { BrowserRouter as Router, Switch, Route, Redirect } from 'react-router-dom';
import reportWebVitals from './reportWebVitals';
import { Provider } from 'react-redux'
import store from './redux/store/store'
ReactDOM.render(
  <React.StrictMode>
    <Provider store={store}>
      <Router>
        <Switch>
          <Route exact path="/login" component={Login} />
          <Route exact path="/404" component={Notfound} />
          <Route path="/admin" component={Index} />
          <Redirect from="/" to="/login" />
          <Redirect to="/404" />
        </Switch>
      </Router>
    </Provider>
  </React.StrictMode>,
  document.getElementById('root')
);
reportWebVitals();
